package com.engine.salary.entity.salaryacct.po;

import com.engine.hrmelog.annotation.ElogTransform;
import com.engine.salary.annotation.Auth;
import com.engine.salary.common.LocalDateRange;
import com.engine.salary.enums.auth.AuthCheckTypeEnum;
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * 薪资核算表
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ElogTransform( name = "薪资核算记录" )
//hrsa_salary_acct_record
@Auth(page = "salaryAcct",checkType = AuthCheckTypeEnum.SOB)
public class SalaryAcctRecordPO {

    /**
     * 主键id
     */
    @ElogTransform( name = "主键id" )
    private Long id;

    /**
     * 薪资所属月
     */
    @ElogTransform( name = "薪资所属月" )
    private Date salaryMonth;

    /**
     * 税款所属期
     */
    @ElogTransform( name = "税款所属期" )
    private Date taxCycle;

    /**
     * 薪资账套id
     */
    @ElogTransform( name = "薪资账套id" )
    private Long salarySobId;

    /**
     * 核算状态
     * @see SalaryAcctRecordStatusEnum
     */
    @ElogTransform( name = "核算状态" )
    private Integer status;

    /**
     * 本次核算是账套（salarySobId）在本月（salaryMonth）的第几次核算
     */
    @ElogTransform( name = "核算次数" )
    private Integer acctTimes;

    /**
     * 是否是回算 0：不是回算、1：是回算
     */
    @ElogTransform( name = "是否是回算" )
    private Integer backCalcStatus;

    /**
     * 回算（上次核算的薪资核算记录id）
     */
    @Deprecated
    private Long superId;

    /**
     * 回算（最原始的那次薪资核算记录id）
     */
    @Deprecated
    private Long rootId;

    /**
     * 备注
     */
    @ElogTransform( name = "备注" )
    private String description;

    /**
     * 租户key
     */
    @ElogTransform( name = "租户key" )
    private String tenantKey;

    /**
     * 创建人id
     */
    @ElogTransform( name = "创建人id" )
    private Long creator;

    /**
     * 是否删除
     */
    @ElogTransform( name = "是否删除" )
    private Integer deleteType;

    /**
     * 创建时间
     */
    @ElogTransform( name = "创建时间" )
    private Date createTime;

    /**
     * 更新时间
     */
    @ElogTransform( name = "更新时间" )
    private Date updateTime;

    private Long taxAgentId;

    /**
     * 审批流程id
     */
    private String approvalId;

    /**
     * 审批状态
     */
    private String approvalStatus;

    /**
     * 锁定的薪资项目
     */
    @Deprecated
    private List<Long> lockSalaryItemIds;


    private Set<String> opts;

    //查询条件-------------------------------
    Collection<Long> ids;

    //薪资账套id
    Collection<Long> salarySobIds;

    //税款所属期
    LocalDateRange salaryMonths;

    //税款所属期
    LocalDateRange taxCycleDateRange;
}
